<template>
    <div>
        啊啊啊啊
    </div>
</template>

<script>
export default {
    data(){
        return{

        }
    },
    mounted(){
        this.newEs6()
    },
    methods:{
        async newEs6() {
            await new Promise((resolve,reject) => {
                console.log('11111')

                
               // reject('失败') // ..走 .catch
                resolve('成功') // 走.then 
                //同时出现 执行最后面的
            }).then(resp => {
                console.log('22222',resp) /// 成功
            }).catch(resp => {
                console.log('3333',resp) /// 失败
            }).finally(resp => {
                console.log('4444',resp) /// 无论如何都走
            })

            
        },
    }
}
</script>

<style scoped>
</style>